// 将请求封装为promise
function wxapi(function_name, obj) {
  return new Promise((resole, reject)=>{
    wx[function_name]({
      ...obj,
      success: res => (resole(res),console.log(res)),
      faile:res=>reject(res)
    })
  })
}
 
module.exports = {wxapi}